<p xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core">
                        
    <h:dataTable value="#{results}" styleClass="dvdtable" var="item" border="0" cellpadding="1" cellspacing="0">
        <h:column>
            <f:facet name="header">
                <h:outputText value="Action"/>
            </f:facet>

            <h:commandLink action="#{currentuser.add}">
                <f:param name="id" value="#{item.id}"/>
                <h:outputText value="Ajoute"/>
            </h:commandLink>
            <br/>
            <h:commandLink action="#{search.detail}">
                <f:param name="id" value="#{item.id}"/>
                <h:outputText value="Detail"/>
            </h:commandLink>
        </h:column>

                            
        <h:column>
            <f:facet name="header">
                <h:outputText value="Image"/>
            </f:facet>
            <h:graphicImage value="loadResourceImage?resId=#{item.id}" width="60" />
        </h:column>
                            
        <h:column>
            <f:facet name="header">
                <h:outputText value="Type"/>
            </f:facet>
            <h:outputText value="#{item.type.label}"/>
        </h:column>

            
        <h:column>
            <f:facet name="header">
                <h:outputText value="Titre"/>
            </f:facet>
            <h:outputText value="#{item.title}"/>
        </h:column>

        <h:column>
            <f:facet name="header">
                <h:outputText value="Auteur"/>
            </f:facet>
            <h:outputText value="#{item.auteur}"/>
        </h:column>

        <h:column>
            <f:facet name="header">
                <h:outputText value="Date"/>
            </f:facet>
            <h:outputText value="#{item.dateDePublication}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputText>
        </h:column>
                            
    </h:dataTable>
</p>
